import java.util.PriorityQueue;

/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2021/11/9
 * Time: 10:11
 * Description:
 */
public class TestDemo {

    public static void main(String[] args) {
        //小堆  默认容量是11
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(13);
        priorityQueue.offer(2);
        priorityQueue.offer(5);

        System.out.println(priorityQueue.poll());
    }

    public static void main1(String[] args) {
        int[] array = {27,15,19,18,28,34,65,49,25,37};
        TestHeap testHeap = new TestHeap();
        testHeap.createHeap(array);
        testHeap.push(80);
        //System.out.println("fafafafa");
        System.out.println(testHeap.pop());
        System.out.println("fafafafa");
        System.out.println(testHeap.peek());
    }
}
